package com.easyj.admin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.easyj.base.util.SpringContextHolder;

@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan(basePackages = "com.easyj")
@MapperScan("com.easyj.admin.db.mapper")
@EnableCaching
@EnableAsync
@EnableScheduling
public class EasyjAdminRestApplication {

	public static void main(String[] args) {
		SpringApplication.run(EasyjAdminRestApplication.class, args);
	}
	/**
	 * create bean SpringContextHolder
	 * @return
	 */
	@Bean
    public SpringContextHolder springContextHolder() {
        return new SpringContextHolder();
    }

}
